# Include the directory itself as a path to include directories
set( CMAKE_INCLUDE_CURRENT_DIR ON )

# Add requirements for external libraries
find_package( Revel REQUIRED )
find_package( Lua51 REQUIRED )
include_directories( ${Revel_INCLUDE_DIR} ${LUA_INCLUDE_DIR} )

# Create a variable containing all .cpp files
file( GLOB pl_revel_SOURCES *.cpp )

# Create a variable containing all .h files
file( GLOB pl_revel_HEADERS *.h )

# Create a library for this module
add_library( pl_revel ${pl_revel_SOURCES} ${pl_revel_HEADERS} ${pl_revel_LUA_TGTS} )

# Set up other dependencies
target_link_libraries( pl_revel ${Revel_LIBRARIES} )
target_link_libraries( pl_revel ${LUA_LIBRARIES} )

# Set up installation targets
install( FILES ${pl_revel_LUA_TGTS} DESTINATION bin/revel )
